﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using GPCSC.Webs;
using System.Collections;

namespace HSYCWeb.web.DOCS
{
    public partial class RCZCS :  PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                this.MtxtD_RCID.Value = Guid.NewGuid().ToString();
            }
        }

        /// <summary>
        /// 报送
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            try
            {
                saveRC();
               
            }
            catch (Exception ee)
            {
                throw ee;
            }
        }
        
        /// <summary>
        /// 保存录入信息
        /// </summary>
        protected void saveRC()
        {
            Hashtable htable = f_getElements();
            GPCSC.Webs.databyhtable dtable = new GPCSC.Webs.databyhtable();
            dtable.databyhtables(base.o_uiTable, "add", "GJRC", "", "");

            this.Response.Write("<script>alert('添加成功！');</script>");
        }
        /// <summary>
        /// 发送电子邮件
        /// </summary>
        protected void sendemail()
        {
            GPCSC.Webs.SendEmail se = new SendEmail();
            string sjEmail = this.MtxtD_Emaile.Value;
            se.sendMails("mayawei890102@163.com", sjEmail, "测试", "测试", "mayawei890102", "wwyawei", "");


        }
        /// <summary>
        /// UIFactory Get Values as Hashtable:界面工厂获取值，并保存在哈希表
        /// </summary>
        /// <returns></returns>
        public Hashtable f_getElements()
        {
            base.o_uiTable.Clear();
            base.o_uiTable = GPCSC.Webs.UIFactory.UIFactory_Get(this);
            base.o_uiTable.Add("STATE", 0);
            base.o_uiTable.Add("txdate",DateTime.Now);
            return base.o_uiTable;
        }
    }
}